﻿using System.IO;
using Byond.Persistence;

namespace Byond.Standalone
{
	class StandalonePersistenceManager : PersistenceManager
	{
		private readonly string _sessionPersistenceFileName;

		public StandalonePersistenceManager(Env env)
		{
			_sessionPersistenceFileName = env.RootPath + "\\LastSession.dat";
		}

		protected override void DoPersistJson(string json)
		{
			File.WriteAllText(_sessionPersistenceFileName, json);
		}
	}
}
